package com.moyu.common.core.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Author 赵彦博
 * @Date 2024/11/19 11:08
 */
@AllArgsConstructor
@Getter
public enum ResultCode {

    /**
     * 定义状态码
     */

    //操作成功
    SUCCESS(1000, "操作成功"),

    //服务器内部错误，友好提⽰
    ERROR(2000, "服务繁忙请稍后重试"),

    //操作失败，但是服务器不存在异常
    FAILED(3000, "操作失败"),

    FAILED_UNAUTHORIZED(3001, "未授权"),
    FORBIDDEN(3005, "权限不足"),
    TOKEN_IS_INVALID(1002, "Token无效"),

    FAILED_PARAMS_VALIDATE(3002, "参数校验失败"),

    FAILED_NOT_EXISTS(3003, "资源不存在"),

    FAILED_ALREADY_EXISTS(3004, "资源已存在"),

    AILED_USER_EXISTS(3101, "⽤⼾已存在"),

    FAILED_USER_NOT_EXISTS(3102, "⽤⼾不存在"),

    FAILED_LOGIN(3103, "⽤⼾名或密码错误"),

    FAILED_USER_BANNED(3104, "您已被列⼊⿊名单, 请联系管理员."),

    AILED_DEPT_EXISTS(4101, "部门已存在"),
    AILED_ROLE_EXISTS(4102, "角色已存在"),

    TODAY_HAS_CLOCKED_IN(5000, "今日已经签到过"),

    TODAY_HAS_CLOCKED_OUT(5001, "今日已经签签退过"),
    TODAY_HAS_NOT_CLOCKED_IN(5002, "今日还没有签到"),
    FILE_NOT_FOUND(6001, "文件不存在");

    private int code;

    private String msg;

}
